package com.scap.dfs.model;

import java.io.Serializable;

import javax.persistence.*;

/**
 * The primary key class for the DAILY_CAL_FORMULA database table.
 * 
 */
@Embeddable
public class DailyCalFormulaPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="HOSPITAL_CODE",columnDefinition="NVARCHAR(50)")
	private String hospitalCode;

	@Column(name="FORMULA_ID")
	private Integer formulaId;

	public DailyCalFormulaPK() {
	}
	public String getHospitalCode() {
		return this.hospitalCode;
	}
	public void setHospitalCode(String hospitalCode) {
		this.hospitalCode = hospitalCode;
	}
	public Integer getFormulaId() {
		return this.formulaId;
	}
	public void setFormulaId(Integer formulaId) {
		this.formulaId = formulaId;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((formulaId == null) ? 0 : formulaId.hashCode());
		result = prime * result
				+ ((hospitalCode == null) ? 0 : hospitalCode.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DailyCalFormulaPK other = (DailyCalFormulaPK) obj;
		if (formulaId == null) {
			if (other.formulaId != null)
				return false;
		} else if (!formulaId.equals(other.formulaId))
			return false;
		if (hospitalCode == null) {
			if (other.hospitalCode != null)
				return false;
		} else if (!hospitalCode.equals(other.hospitalCode))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "DailyCalFormulaPK [hospitalCode=" + hospitalCode
				+ ", formulaId=" + formulaId + "]";
	}
	
	
	
	
}